-----------------------------------------------------------------------
KeyboardInterrupt Traceback (most recent call last)
<ipython-input-9-2139667b596b> in <module>()
----> 1 df_categories.loc[:,categories_keep]
~/anaconda/lib/python3.6/site-packages/IPython/core/displayhook.py in __call__(self, result)
255 self.start_displayhook()
256 self.write_output_prompt()
--> 257 format_dict, md_dict = self.compute_format_data(result)
258 self.update_user_ns(result)
259 self.fill_exec_result(result)
~/anaconda/lib/python3.6/site-packages/IPython/core/displayhook.py in compute_format_data(self, result)
149
150 """
--> 151 return self.shell.display_formatter.format(result)
152
153 # This can be set to True by the write_output_prompt method in a subclass
~/anaconda/lib/python3.6/site-packages/IPython/core/formatters.py in format(self, obj, include, exclude)
178 md = None
179 try:
--> 180 data = formatter(obj)
181 except:
182 # FIXME: log the exception
<decorator-gen-10> in __call__(self, obj)
~/anaconda/lib/python3.6/site-packages/IPython/core/formatters.py in catch_format_error(method, self, *args, **kwargs)
222 """show traceback on failed format call"""
223 try:
--> 224 r = method(self, *args, **kwargs)
225 except NotImplementedError:
226 # don't warn on NotImplementedErrors
~/anaconda/lib/python3.6/site-packages/IPython/core/formatters.py in __call__(self, obj)
700 type_pprinters=self.type_printers,
701 deferred_pprinters=self.deferred_printers)
--> 702 printer.pretty(obj)
703 printer.flush()
704 return stream.getvalue()
~/anaconda/lib/python3.6/site-packages/IPython/lib/pretty.py in pretty(self, obj)
393 if callable(meth):
394 return meth(obj, self, cycle)
--> 395 return _default_pprint(obj, self, cycle)
396 finally:
397 self.end_group()
~/anaconda/lib/python3.6/site-packages/IPython/lib/pretty.py in _default_pprint(obj, p, cycle)
508 if _safe_getattr(klass, '__repr__', None) is not object.__repr__:
509 # A user-provided repr. Find newlines and replace them with p.break_()
--> 510 _repr_pprint(obj, p, cycle)
511 return
512 p.begin_group(1, '<')
~/anaconda/lib/python3.6/site-packages/IPython/lib/pretty.py in _repr_pprint(obj, p, cycle)
699 """A pprint that just redirects to the normal repr function."""
700 # Find newlines and replace them with p.break_()
--> 701 output = repr(obj)
702 for idx,output_line in enumerate(output.splitlines()):
703 if idx:
~/anaconda/lib/python3.6/site-packages/pandas/core/base.py in __repr__(self)
78 Yields Bytestring in Py2, Unicode String in py3.
79 """
---> 80 return str(self)
81
82
~/anaconda/lib/python3.6/site-packages/pandas/core/base.py in __str__(self)
57
58 if compat.PY3:
---> 59 return self.__unicode__()
60 return self.__bytes__()
61
~/anaconda/lib/python3.6/site-packages/pandas/core/frame.py in __unicode__(self)
634 width = None
635 self.to_string(buf=buf, max_rows=max_rows, max_cols=max_cols,
--> 636 line_width=width, show_dimensions=show_dimensions)
637
638 return buf.getvalue()
~/anaconda/lib/python3.6/site-packages/pandas/core/frame.py in to_string(self, buf, columns, col_space, header, index, na_rep, formatters, float_format, sparsify, index_names, justify, line_width, max_rows, max_cols, show_dimensions)
1672 max_rows=max_rows,
1673 max_cols=max_cols,
-> 1674 show_dimensions=show_dimensions)
1675 formatter.to_string()
1676
~/anaconda/lib/python3.6/site-packages/pandas/io/formats/format.py in __init__(self, frame, buf, columns, col_space, header, index, na_rep, formatters, justify, float_format, sparsify, index_names, line_width, max_rows, max_cols, show_dimensions, decimal, **kwds)
416 self.columns = frame.columns
417
--> 418 self._chk_truncate()
419 self.adj = _get_adjustment()
420
~/anaconda/lib/python3.6/site-packages/pandas/io/formats/format.py in _chk_truncate(self)
487 else:
488 row_num = max_rows_adj // 2
--> 489 frame = concat((frame.iloc[:row_num, :],
490 frame.iloc[-row_num:, :]))
491 self.tr_row_num = row_num
~/anaconda/lib/python3.6/site-packages/pandas/core/indexing.py in __getitem__(self, key)
1365 except (KeyError, IndexError):
1366 pass
-> 1367 return self._getitem_tuple(key)
1368 else:
1369 # we by definition only have the 0th axis
~/anaconda/lib/python3.6/site-packages/pandas/core/indexing.py in _getitem_tuple(self, tup)
1751 continue
1752
-> 1753 retval = getattr(retval, self.name)._getitem_axis(key, axis=axis)
1754
1755 # if the dim was reduced, then pass a lower-dim the next time
~/anaconda/lib/python3.6/site-packages/pandas/core/indexing.py in _getitem_axis(self, key, axis)
1803 if isinstance(key, slice):
1804 self._has_valid_type(key, axis)
-> 1805 return self._get_slice_axis(key, axis=axis)
1806
1807 if isinstance(key, list):
~/anaconda/lib/python3.6/site-packages/pandas/core/indexing.py in _get_slice_axis(self, slice_obj, axis)
1772 slice_obj = self._convert_slice_indexer(slice_obj, axis)
1773 if isinstance(slice_obj, slice):
-> 1774 return self._slice(slice_obj, axis=axis, kind='iloc')
1775 else:
1776 return self.obj._take(slice_obj, axis=axis, convert=False)
~/anaconda/lib/python3.6/site-packages/pandas/core/indexing.py in _slice(self, obj, axis, kind)
153 if axis is None:
154 axis = self.axis
--> 155 return self.obj._slice(obj, axis=axis, kind=kind)
156
157 def _get_setitem_indexer(self, key):
~/anaconda/lib/python3.6/site-packages/pandas/core/sparse/frame.py in _slice(self, slobj, axis, kind)
511 new_columns = self.columns[slobj]
512
--> 513 return self.reindex(index=new_index, columns=new_columns)
514
515 def xs(self, key, axis=0, copy=False):
~/anaconda/lib/python3.6/site-packages/pandas/util/_decorators.py in wrapper(*args, **kwargs)
125 @wraps(func)
126 def wrapper(*args, **kwargs):
--> 127 return func(*args, **kwargs)
128
129 if not PY2:
~/anaconda/lib/python3.6/site-packages/pandas/core/frame.py in reindex(self, *args, **kwargs)
2933 kwargs.pop('axis', None)
2934 kwargs.pop('labels', None)
-> 2935 return super(DataFrame, self).reindex(**kwargs)
2936
2937 @Appender(_shared_docs['reindex_axis'] % _shared_doc_kwargs)
~/anaconda/lib/python3.6/site-packages/pandas/core/generic.py in reindex(self, *args, **kwargs)
3021 # perform the reindex on the axes
3022 return self._reindex_axes(axes, level, limit, tolerance, method,
-> 3023 fill_value, copy).__finalize__(self)
3024
3025 def _reindex_axes(self, axes, level, limit, tolerance, method, fill_value,
~/anaconda/lib/python3.6/site-packages/pandas/core/frame.py in _reindex_axes(self, axes, level, limit, tolerance, method, fill_value, copy)
2868 if index is not None:
2869 frame = frame._reindex_index(index, method, copy, level,
-> 2870 fill_value, limit, tolerance)
2871
2872 return frame
~/anaconda/lib/python3.6/site-packages/pandas/core/sparse/frame.py in _reindex_index(self, index, method, copy, level, fill_value, limit, takeable)
669 values = series.values
670 # .take returns SparseArray
--> 671 new = values.take(indexer)
672 if need_mask:
673 new = new.values
~/anaconda/lib/python3.6/site-packages/pandas/core/sparse/array.py in take(self, indices, axis, allow_fill, fill_value, **kwargs)
509 indices[indices < 0] += n
510
--> 511 locs = self.sp_index.lookup_array(indices)
512 indexer = np.arange(len(locs), dtype=np.int32)
513 mask = locs != -1
KeyboardInterrupt: